import {types} from 'mobx-state-tree';
import {MenuStore} from './MenuStore';

export const HomeStore = types
    .model('Home', {
        menuStore: types.late(() => types.optional(MenuStore, {})),
    })
    .views(self => ({}))
    .actions(self => {
        return {
            afterCreate() {
                self.menuStore.load();
            }
        };
    });

export type IHomeStore = typeof HomeStore;
